package com.example.mydemo.service.impl;

import com.example.mydemo.entity.Role;
import com.example.mydemo.entity.Users;
import com.example.mydemo.mapper.RoleMapper;
import com.example.mydemo.model.UserVO;
import com.example.mydemo.service.IRoleService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author syf
 * @since 2025-05-28
 */
@Service
public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements IRoleService {
    @Autowired
    private RoleMapper roleMapper;

    public List<Role> selectByName(String id){
        return roleMapper.selectByName(id);
    }
    public int delete(Long id){
        return roleMapper.deleteByName(id);
    }
    public void saveUser(Role role){
        roleMapper.insert(role);
    };
}
